            <g:form action="save" method="post" >
                <div class="dialog">
                    <div>
                        <span class="element-label">
                            <label for="name"><g:message code="collection.name.label" default="Name" /></label>
                        </span>
                        <span class="element-value ${hasErrors(bean: collectionInstance, field: 'name', 'errors')}">
                            <g:textField name="name" value="${collectionInstance?.name}" size="65" />
                        </span>
                    </div>
                    <div class="clear"></div>

                    <div>
                        <span class="element-label">
                            <label for="logoUrl"><g:message code="collection.logoUrl.label" default="Logo URL" /></label>
                        </span>
                        <span class="element-value ${hasErrors(bean: collectionInstance, field: 'logoUrl', 'errors')}">
                            <g:textField name="logoUrl" value="${collectionInstance?.logoUrl}" size="65" />
                        </span>
                    </div>
                    <div class="clear"></div>

                    <div>
                        <span class="element-label">
                            <label for="owner"><g:message code="collection.owner.label" default="Owner" /></label>
                        </span>
                        <span class="element-value ${hasErrors(bean: collectionInstance, field: 'owner', 'errors')}">
                            <g:select name="owner.id" from="${org.ibiblio.terasaur.user.User.list()}" optionKey="id" optionValue="username" value="${collectionInstance?.owner?.id}"  />
                        </span>
                    </div>
                    <div class="clear"></div>
                </div>
<g:if test="${buttonType == 'create'}">
                <div class="buttons">
                    <span class="button"><g:submitButton name="create" class="save" value="${message(code: 'default.button.create.label', default: 'Create')}" /></span>
                </div>
</g:if>
<g:if test="${buttonType == 'edit'}">
                <div class="buttons">
                    <input type="hidden" name="id" value="${collectionInstance?.id}" />
                    <span class="button"><g:actionSubmit class="save" action="update" value="${message(code: 'default.button.update.label', default: 'Update')}" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
                </div>
</g:if>
            </g:form>
